package com.hmkj.core.service.amount;

import com.hmkj.core.po.amount.AccountLog;
import com.hmkj.core.service.base.GenericService;

import java.math.BigDecimal;

/**
 * 资金记录业务相关Service接口<br>
 *
 * @author donfy
 * @ClassName: AccountLogService
 * @date 2017-08-15 03:10:41
 */
public interface AccountLogService extends GenericService<Integer, AccountLog> {

    /**
     * 根据类型统计操作金额
     *
     * @param type   操作类型
     * @param userId 用户ID
     * @return
     */
    BigDecimal selectSumByType(AccountLog.TYPE type,AccountLog.TYPE type1,Integer userId);

    /**
     * 根据类型和资金流向统计操作金额
     *
     * @param direction  资金流向
     * @param type   操作类型
     * @param userId 用户ID
     * @return
     */
    BigDecimal selectSumByAirectionType(AccountLog.DIRECTION direction, AccountLog.TYPE type, Integer userId);

    BigDecimal selectSumAmountByType( AccountLog.TYPE type,String startTime,String endTime,Integer agentId);
}
